/* 全局应用样式 */

/* 基础重置和应用整体布局 */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(25, 118, 210, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
}

/* 通用动画定义 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 状态指示器 */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(25, 118, 210, 0.7);
  font-size: 14px;
}

.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(25, 118, 210, 0.3);
  border-top: 2px solid #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 通知样式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 14px;
  font-weight: 500;
  max-width: 400px;
  animation: notificationSlideIn 0.3s ease-out;
  backdrop-filter: blur(10px);
}

.notification-success {
  background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.notification-error {
  background: linear-gradient(135deg, #fdeaea 0%, #f8d7da 100%);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.notification-warning {
  background: linear-gradient(135deg, #fffbf0 0%, #fff3cd 100%);
  color: #856404;
  border: 1px solid #ffeaa7;
}

.notification-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #d1ecf1 100%);
  color: #1565c0;
  border: 1px solid #90caf9;
}

.notification-icon {
  font-size: 16px;
}

.notification-message {
  flex: 1;
}

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  opacity: 1;
}

.notification-hide {
  animation: notificationSlideOut 0.3s ease-in forwards;
}

@keyframes notificationSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notificationSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
